<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 1000px;
            height: 800px;
            border: 1px solid red;
            background-image: url("img/1.jpg");
            /*默认是全部平铺*/
        }
        .d1{    /*水平平铺*/
            background-repeat:repeat-x ;
        }
        .d2{    /*垂直平铺*/
            background-repeat: repeat-y;
        }
        .d3{     /*取消平铺*/
            background-repeat: no-repeat;
        }
    </style>
</head>
<body>

<div class="d1"></div>
<div class="d2"></div>
<div class="d3"></div>

</body>
</html>